package com.qianli.cashmama.trade.client.trade.request;

import com.fqgj.common.api.ParamsObject;
import com.fqgj.exception.common.ApplicationException;
import org.apache.commons.lang.StringUtils;

/**
 * @program: cashmama-trade-center
 * @description
 * @author: frank
 * @create: 2020-11-18 15:12
 **/
public class CreateAuditSuccessTradeRequest extends ParamsObject {

    /**
     * 用户code
     */
    private String userCode;
    /**
     * 产品类目
     */
    private String categoryCode;
    /**
     * 渠道号
     */
    private String channelCode;
    /**
     * 产品code
     */
    private String productCode;
    /**
     * 三方唯一订单号
     */
    private String orderId;
    /**
     * 银行名称
     */
    private String bankName;
    /**
     * 银行好卡
     */
    private String bankNo;
    /**
     * ifscCode
     */
    private String ifscCode;
    /**
     * 手机号
     */
    private String phone;
    /**
     * 邮件
     */
    private String email;
    /**
     * 姓名
     */
    private String acctName;
    /**
     * 到账金额
     */
    private String arrivalAmount;
    /**
     * 合同金额
     */
    private String contractAmount;


    @Override
    public void validate() {
        if (StringUtils.isEmpty(userCode)) {
            throw new ApplicationException("userCode can not be empty");
        }
        if (StringUtils.isEmpty(categoryCode)) {
            throw new ApplicationException("categoryCode can not be empty");
        }
        if (StringUtils.isEmpty(channelCode)) {
            throw new ApplicationException("channelCode can not be empty");
        }
        if (StringUtils.isEmpty(productCode)) {
            throw new ApplicationException("productCode can not be empty");
        }
        if (StringUtils.isEmpty(orderId)) {
            throw new ApplicationException("orderId can not be empty");
        }
        if (StringUtils.isEmpty(bankName)) {
            throw new ApplicationException("bankName can not be empty");
        }
        if (StringUtils.isEmpty(bankNo)) {
            throw new ApplicationException("bankNo can not be empty");
        }
        if (StringUtils.isEmpty(ifscCode)) {
            throw new ApplicationException("ifscCode can not be empty");
        }
        if (StringUtils.isEmpty(phone)) {
            throw new ApplicationException("phone can not be empty");
        }
        if (StringUtils.isEmpty(email)) {
            throw new ApplicationException("email can not be empty");
        }
        if (StringUtils.isEmpty(acctName)) {
            throw new ApplicationException("acctName can not be empty");
        }
        if (StringUtils.isEmpty(arrivalAmount)) {
            throw new ApplicationException("arrivalAmount can not be empty");
        }
        if (StringUtils.isEmpty(contractAmount)) {
            throw new ApplicationException("contractAmount can not be empty");
        }
    }

    public String getChannelCode() {
        return channelCode;
    }

    public CreateAuditSuccessTradeRequest setChannelCode(String channelCode) {
        this.channelCode = channelCode;
        return this;
    }

    public String getProductCode() {
        return productCode;
    }

    public CreateAuditSuccessTradeRequest setProductCode(String productCode) {
        this.productCode = productCode;
        return this;
    }

    public String getUserCode() {
        return userCode;
    }

    public CreateAuditSuccessTradeRequest setUserCode(String userCode) {
        this.userCode = userCode;
        return this;
    }

    public String getCategoryCode() {
        return categoryCode;
    }

    public CreateAuditSuccessTradeRequest setCategoryCode(String categoryCode) {
        this.categoryCode = categoryCode;
        return this;
    }

    public String getOrderId() {
        return orderId;
    }

    public CreateAuditSuccessTradeRequest setOrderId(String orderId) {
        this.orderId = orderId;
        return this;
    }

    public String getBankName() {
        return bankName;
    }

    public CreateAuditSuccessTradeRequest setBankName(String bankName) {
        this.bankName = bankName;
        return this;
    }

    public String getBankNo() {
        return bankNo;
    }

    public CreateAuditSuccessTradeRequest setBankNo(String bankNo) {
        this.bankNo = bankNo;
        return this;
    }

    public String getIfscCode() {
        return ifscCode;
    }

    public CreateAuditSuccessTradeRequest setIfscCode(String ifscCode) {
        this.ifscCode = ifscCode;
        return this;
    }

    public String getPhone() {
        return phone;
    }

    public CreateAuditSuccessTradeRequest setPhone(String phone) {
        this.phone = phone;
        return this;
    }

    public String getEmail() {
        return email;
    }

    public CreateAuditSuccessTradeRequest setEmail(String email) {
        this.email = email;
        return this;
    }

    public String getAcctName() {
        return acctName;
    }

    public CreateAuditSuccessTradeRequest setAcctName(String acctName) {
        this.acctName = acctName;
        return this;
    }

    public String getArrivalAmount() {
        return arrivalAmount;
    }

    public CreateAuditSuccessTradeRequest setArrivalAmount(String arrivalAmount) {
        this.arrivalAmount = arrivalAmount;
        return this;
    }

    public String getContractAmount() {
        return contractAmount;
    }

    public CreateAuditSuccessTradeRequest setContractAmount(String contractAmount) {
        this.contractAmount = contractAmount;
        return this;
    }
}
